<template>
	<div class="card_container" :style="{height: heightClient,width: widthClient}">
		<div class="card">
			<slot></slot>
			<img src="../../assets/close.png" @click="deleteCard">
			<div class="button">
				<el-button @click="sure">确定</el-button>
				<el-button @click="cancel">取消</el-button>
			</div>
		</div>
	</div>
</template>
<script>
	export default {
		methods: {
			deleteCard () {
				this.$emit('deleteCard')
			},
			sure () {
				this.$emit('sure')
			},
			cancel () {
				this.$emit('cancel')
			}
		},
		created () {
			this.heightClient = document.body.clientHeight  + 'px'
			this.widthClient = document.body.clientWidth  + 'px'
		}
	}
</script>
<style lang="scss" scoped>
	.card_container{
		background: red;
		position: absolute;
		top: 0;
		left: 0;
		z-index: 100;
		.card{
			width: 394px;
			height: 224px;
			position: absolute;
			margin-left: -197px;
			margin-top: -112px;
			left: 50%;
			top: 50%;
			background: #fff;
			z-index: 112;
			img{
				position: absolute;
				left: 100%;
				top: -15%;
				cursor: pointer;
			}
			.button{
				width: 80%;
				margin: 0 auto;
				.el-button{
					width: 45%;
					height: 40px;
					background: #43BEF8;
					color: #fff;
					font-size: 16px;
					margin-top: 20px;
				}
				.el-button:first-child{
					margin-right: 5%;
					background: #F7F7F7;
					color:#E21010;
				}
			}
		}
	}
</style>